import { createApp } from 'vue'
import { createPinia } from 'pinia'
import App from './App.vue'
import router from './router'

// 引入 Vant 组件
import 'vant/lib/index.css';
import './assets/styles/global.css';

// 引入 Vant 组件
import {
  Button,
  Cell,
  CellGroup,
  Icon,
  Image,
  Lazyload,
  Loading,
  Notify,
  Overlay,
  Tab,
  Tabs,
  List,
  PullRefresh,
  Sticky,
  Tag,
  Form,
  Field,
  Uploader,
  Picker,
  Popup,
  Calendar,
  Checkbox,
  CheckboxGroup,
  Radio,
  RadioGroup,
  Switch,
  Stepper,
  Slider,
  ActionSheet,
  Dialog,
  DropdownMenu,
  DropdownItem,
  Sidebar,
  SidebarItem,
  NavBar,
  Tabbar,
  TabbarItem,
  Card,
  Collapse,
  CollapseItem,
  Divider,
  Empty,
  Skeleton,
  CountDown,
  Progress,
  Swipe,
  SwipeItem
} from 'vant';

const app = createApp(App);

// 注册 Vant 组件
app.use(Button)
   .use(Cell)
   .use(CellGroup)
   .use(Icon)
   .use(Image)
   .use(Lazyload)
   .use(Loading)
   .use(Notify)
   .use(Overlay)
   .use(Tab)
   .use(Tabs)
   .use(List)
   .use(PullRefresh)
   .use(Sticky)
   .use(Tag)
   .use(Form)
   .use(Field)
   .use(Uploader)
   .use(Picker)
   .use(Popup)
   .use(Calendar)
   .use(Checkbox)
   .use(CheckboxGroup)
   .use(Radio)
   .use(RadioGroup)
   .use(Switch)
   .use(Stepper)
   .use(Slider)
   .use(ActionSheet)
   .use(Dialog)
   .use(DropdownMenu)
   .use(DropdownItem)
   .use(Sidebar)
   .use(SidebarItem)
   .use(NavBar)
   .use(Tabbar)
   .use(TabbarItem)
   .use(Card)
   .use(Collapse)
   .use(CollapseItem)
   .use(Divider)
   .use(Empty)
   .use(Skeleton)
   .use(CountDown)
   .use(Progress)
   .use(Swipe)
   .use(SwipeItem);

app.use(createPinia())
app.use(router)

app.mount('#app')